class ShopAddress < ActiveRecord::Base
  belongs_to :shop
  has_many :shop_products

  validates_presence_of :shop_id

  validates_presence_of :addr
  validates_length_of :addr, :in => 5..140, :allow_nil => false
  validates_uniqueness_of :addr, :scope => :shop_id
end
